/*
* @Author: viivLgr
* @Date:   2018-03-20 10:12:45
 * @Last Modified by: viivLgr
 * @Last Modified time: 2018-03-22 12:36:03
*/

'use strict';
require('./index.css');
require('page/common/nav/index.js');
require('page/common/header/index.js');
require('util/slider/index.js');
var templateBanner = require('./banner.string');
var _util = require('util/util.js');

$(function(){
    // 渲染banner的html
    var bannerHtml = _util.renderHtml(templateBanner);
    $('.banner-con').html(bannerHtml)
    var $slider = $('.banner').unslider({
        dots: true
    });
    $('.banner-con .banner-arrow').click(function(){
        var forward = $(this).hasClass('prev') ? 'prev' : 'next';
        $slider.data('unslider')[forward]();
    });
});